from urllib.request import Request,urlopen
from fake_useragent import UserAgent
ur1 = "http://httpbin.org/get"
ua = UserAgent()

headers = {
    "User-Agent":ua.random
}
req =Request(ur1, headers = headers)
resp = urlopen(req)
print(resp.read().decode())


